package com.itcast.factory;

import com.itcast.Dao.DaoImpl.PublicDaoImpl;
import com.itcast.Dao.PublicDao;
import org.springframework.beans.factory.FactoryBean;

public class PublicFactoryBean implements FactoryBean<PublicDao> {

    @Override
    public PublicDao getObject() throws Exception {
        return new PublicDaoImpl();
    }

    @Override
    public Class<?> getObjectType() {
        return PublicDao.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
